package com.numbfish.ch03_ex05_module_b.config;

import com.numbfish.ch03_ex04_module_a_stater.config.EnableModuleA;
import com.numbfish.ch03_ex05_module_b.pojo.PersonFromModuleB;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
// 使用注解方式也可以将依赖包中的Bean注入进来
@EnableModuleA
public class CustomConfig {
    @Bean
    public PersonFromModuleB personb1(){
        return new PersonFromModuleB("曹操",44);
    }
}
